home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 5 / BBS in a Box -Volume V (BBS in a Box) (April 1992).iso / Files / Tele / S / SmartClone.3.cpt / SmartClone 0.3.rsrc / STR#_1005.txt < prev    next >
Encoding:
Text File  |  1988-08-22  |  14.1 KB  |  781 lines

  1. SERVICE:               COMMAND KEY: ?
  2.  
  3. ' PhoneBook‚Ķ 6/1/87 Glenn Voloshin
  4.  
  5. ' Modified 7/28/87  by Ken Walter
  6.  
  7. ' Stores six sets of name, number and Communication Control settings in a
  8.  
  9. ' fixed length file called MiniTerminalPhoneBook.
  10.  
  11.  
  12.  
  13.     HOLD ON
  14.  
  15.     CURSOR WATCH
  16.  
  17.     whichLine% = 0
  18.  
  19.     changedSettings% = FALSE%
  20.  
  21.  
  22.  
  23.     doneButton% = 29        ' dialog item numbers
  24.  
  25.     saveChanges% = 14
  26.  
  27.     startText% = 17
  28.  
  29.     startButtons% = 2
  30.  
  31.     startEdit% = 15
  32.  
  33.  
  34.  
  35.     maxLines% = 6           ' field sizes of file
  36.  
  37.     stringWidth% = 16
  38.  
  39.     numParams% = 26
  40.  
  41.     paramWidth% = 3
  42.  
  43.     paramBlockWidth% = numParams% * paramWidth%
  44.  
  45.     wholeBlockWidth% = (2 * stringWidth%) + paramBlockWidth%
  46.  
  47.     IF (@modemFile = "") OR (NOT Exists%(ServiceFPath & @modemFile)) THEN ‚àÇ
  48.  
  49.         GOSUB getModemFile
  50.  
  51.  
  52.  
  53.     IF NOT Exists% (ServiceFPath & "MiniTerminalPhoneBook") THEN ‚àÇ
  54.  
  55.         GOSUB makeFile ‚àÇ
  56.  
  57.     ELSE ‚àÇ
  58.  
  59.         OPEN 1, ServiceFPath & "MiniTerminalPhoneBook", APPEND :‚àÇ
  60.  
  61.         IF ResultCode% <> 0 THEN ‚àÇ
  62.  
  63.             badFile = "MiniTerminalPhoneBook" : ‚àÇ
  64.  
  65.             GOSUB fileIO_Error: ‚àÇ
  66.  
  67.             END
  68.  
  69.     Pos%(1) = maxLines% * wholeBlockWidth%
  70.  
  71.  
  72.  
  73.     GOSUB saveSettings      ' saves the current Com Control settings to be
  74.  
  75.     HOLD OFF                ' restored, if changed while modifying PhoneBook
  76.  
  77.     SET DBOX 406
  78.  
  79.     CheckBox%(1) = @Redial%
  80.  
  81.     GOSUB getText           ' reads file into controls
  82.  
  83.  
  84.  
  85.     whichLine% = 1
  86.  
  87.     GOSUB setEditText       ' put name & number in edit text fields
  88.  
  89.     Pos%(1) = (whichLine% * wholeBlockWidth%) - paramBlockWidth%
  90.  
  91.     GOSUB getSettings   ' read settings from file into Com Control
  92.  
  93.     changedSettings% = TRUE%
  94.  
  95.     HOLD OFF
  96.  
  97.     DBOX 406
  98.  
  99. theLoop:                    ' modeless dialog loop
  100.  
  101.     HOLD OFF
  102.  
  103.     CURSOR RESET
  104.  
  105. theLoop1:
  106.  
  107.     dbr% = DBoxResult% + 2
  108.  
  109.     IF dbr% = 0 THEN ‚àÇ
  110.  
  111.         GOTO theLoop1
  112.  
  113. endLoop:
  114.  
  115.     HOLD ON
  116.  
  117.     CURSOR WATCH
  118.  
  119.     @Redial% = CheckBox%(1)
  120.  
  121.  
  122.  
  123.     IF dbr% = doneButton% THEN ‚àÇ
  124.  
  125.         IF changedSettings% THEN ‚àÇ      ' restore original Com Control settings
  126.  
  127.             Pos%(1) = maxLines% * wholeBlockWidth% :‚àÇ
  128.  
  129.             GOSUB getSettings :‚àÇ
  130.  
  131.             CLOSE 1 :‚àÇ
  132.  
  133.             END ‚àÇ
  134.  
  135.         ELSE ‚àÇ
  136.  
  137.             CLOSE 1 :‚àÇ
  138.  
  139.             END
  140.  
  141.  
  142.  
  143.     IF dbr% = saveChanges% THEN ‚àÇ
  144.  
  145.         IF (whichLine% > 0) AND (whichLine% <= maxLines%) THEN ‚àÇ
  146.  
  147.             GOSUB doSave :‚àÇ             ' write text to file and update dialog
  148.  
  149.             Pos%(1) = (whichLine% * wholeBlockWidth%) - paramBlockWidth% :‚àÇ
  150.  
  151.             GOSUB saveSettings :‚àÇ       ' write Com Control settings to file
  152.  
  153.             GOTO theLoop ‚àÇ
  154.  
  155.         ELSE ‚àÇ
  156.  
  157.             GOTO theLoop
  158.  
  159.  
  160.  
  161.     whichLine% = dbr% DIV 2
  162.  
  163.  
  164.  
  165.     IF dbr% MOD 2 > 0 THEN ‚àÇ            ' a CHANGE button was pressed
  166.  
  167.         GOSUB setEditText :‚àÇ            ' put name & number in edit text fields
  168.  
  169.         Pos%(1) = (whichLine% * wholeBlockWidth%) - paramBlockWidth% :‚àÇ
  170.  
  171.         GOSUB getSettings :‚àÇ            ' read settings from file into Com Control
  172.  
  173.         changedSettings% = TRUE% :‚àÇ
  174.  
  175.         GOTO theLoop
  176.  
  177.  
  178.  
  179.  
  180.  
  181.     GOSUB doDial                        ' dial the PhoneBook number
  182.  
  183.  
  184.  
  185.     END
  186.  
  187.  
  188.  
  189. doSave:
  190.  
  191.     aName = ButtonText(startEdit%)      ' fill blank fields with "???"
  192.  
  193.     IF aName = "" THEN ‚àÇ
  194.  
  195.         aName = "???" ‚àÇ
  196.  
  197.     ELSE ‚àÇ
  198.  
  199.         aName = Left(aName, stringWidth%)
  200.  
  201.     ButtonText(startEdit%) = aName
  202.  
  203.     aNumber = ButtonText(startEdit%+1)
  204.  
  205.     IF aNumber = "" THEN ‚àÇ
  206.  
  207.         aNumber = "???" ‚àÇ
  208.  
  209.     ELSE ‚àÇ
  210.  
  211.         aNumber = Left(aNumber, stringWidth%)
  212.  
  213.     ButtonText(startEdit%+1) = aNumber
  214.  
  215.  
  216.  
  217.     IF (aName <> editName) OR (aNumber <> editNum) THEN ‚àÇ
  218.  
  219.         Pos%(1) = (whichLine% - 1) * wholeBlockWidth% :‚àÇ
  220.  
  221.         WRITE 1, aName :‚àÇ               ' write edit text fields to file
  222.  
  223.         WRITE 1, aNumber :‚àÇ
  224.  
  225.         GOSUB getText                   ' write Com Control settings to file
  226.  
  227.  
  228.  
  229.     RETURN
  230.  
  231.  
  232.  
  233.  
  234.  
  235. setEditText:                            ' set editing controls
  236.  
  237.     ButtonText(saveChanges%) = "Save Changes to " & Str(whichLine%)
  238.  
  239.     Pos%(1) = (whichLine% -1) * wholeBlockWidth%
  240.  
  241.     READ 1, editName
  242.  
  243.     READ 1, editNum
  244.  
  245.     ButtonText(startEdit%+1) = editNum
  246.  
  247.     DBoxResp(1) = editName
  248.  
  249.     RETURN
  250.  
  251.  
  252.  
  253. doDial:                                 ' dial the number
  254.  
  255.     Pos%(1) = (whichLine% -1) * wholeBlockWidth%
  256.  
  257.     READ 1, name
  258.  
  259.     READ 1, phoneNum
  260.  
  261.     CLEAR DBOX 406
  262.  
  263.     IF phoneNum <> "???" THEN ‚àÇ
  264.  
  265.         Pos%(1) = (whichLine% * wholeBlockWidth%) - paramBlockWidth% :‚àÇ
  266.  
  267.         GOSUB getSettings :‚àÇ
  268.  
  269.         commParams = Str(CommC.BPS%) & "," & Str(CommC.DBits%) & "," & Str(CommC.Parity%) & "," & Str(CommC.Sbits%) & "," & Str(CommC.XOnXOff%) :‚àÇ
  270.  
  271.         Message = phoneNum & "|" & commParams ‚àÇ
  272.  
  273.     ELSE ‚àÇ
  274.  
  275.         Message = "Dial called without a phone number.": ‚àÇ
  276.  
  277.         DISPLAY "Connect error:  " & Message: ‚àÇ
  278.  
  279.         CLOSE 1: ‚àÇ
  280.  
  281.         END
  282.  
  283.     CLOSE 1
  284.  
  285.     HOLD OFF
  286.  
  287.     saveMessage = Message
  288.  
  289. reDial:                                     ' come back to here to redial
  290.  
  291.     DO FILE @modemFile "Dial"
  292.  
  293.     IF ResultCode% <> 0 THEN ‚àÇ
  294.  
  295.         badFile = @modemFile: ‚àÇ
  296.  
  297.         badLabel = "Dial": ‚àÇ
  298.  
  299.         GOSUB doFileError: ‚àÇ
  300.  
  301.         END
  302.  
  303.     IF Message <> "" THEN ‚àÇ
  304.  
  305.         IF @Redial% THEN ‚àÇ                  ' if redial flag is set
  306.  
  307.             Message = saveMessage: ‚àÇ        ' using same phone number
  308.  
  309.             GOTO reDial ‚àÇ                   ' dial again
  310.  
  311.         ELSE DISPLAY "Connect error:  " & Message:RETURN
  312.  
  313.     Remark = name
  314.  
  315.     RETURN
  316.  
  317.  
  318.  
  319.  
  320.  
  321. getText:                                    ' reads names and numbers from file
  322.  
  323.     HOLD ON                                 ' into strings, then sets static
  324.  
  325.     Pos%(1) = 0                             ' text fields with those strings
  326.  
  327.     theLine% = 1
  328.  
  329.     theNames = ""
  330.  
  331.     theNumbers = ""
  332.  
  333. getText1:
  334.  
  335.     READ 1, aName
  336.  
  337.     READ 1, aNumber
  338.  
  339.     theNames = theNames & Left(aName, 18) & Chr(13) & Chr(13)
  340.  
  341.     theNumbers = theNumbers & Left(aNumber, 18) & Chr(13) & Chr(13)
  342.  
  343.     IF theLine% < maxLines% THEN ‚àÇ
  344.  
  345.         Pos%(1) = theLine% * wholeBlockWidth% :‚àÇ
  346.  
  347.         theLine% = theLine% + 1 :‚àÇ
  348.  
  349.         GOTO getText1
  350.  
  351.     ButtonText(startText%) = theNames
  352.  
  353.     ButtonText(startText% + 1) = theNumbers
  354.  
  355.     RETURN
  356.  
  357.  
  358.  
  359.  
  360.  
  361. saveSettings:                   ' saves current Com Control settings
  362.  
  363.     WRITE 1, TRUE%              ' this is a flag to indicate settings are saved
  364.  
  365.     WRITE 1, CommC.Bit8%
  366.  
  367.     WRITE 1, CommC.BPS%
  368.  
  369.     WRITE 1, CommC.BSToDEL%
  370.  
  371.     WRITE 1, CommC.CharDelay%
  372.  
  373.     WRITE 1, CommC.Chars%
  374.  
  375.     WRITE 1, CommC.CharSet%
  376.  
  377.     WRITE 1, CommC.CurBlink%
  378.  
  379.     WRITE 1, CommC.CurShape%
  380.  
  381.     WRITE 1, CommC.DBits%
  382.  
  383.     WRITE 1, CommC.G0%
  384.  
  385.     WRITE 1, CommC.G1%
  386.  
  387.     WRITE 1, CommC.LFCRIn%
  388.  
  389.     WRITE 1, CommC.LFCROut%
  390.  
  391.     WRITE 1, CommC.LineDelay%
  392.  
  393.     WRITE 1, CommC.Lines%
  394.  
  395.     WRITE 1, CommC.LocEcho%
  396.  
  397.     WRITE 1, CommC.Parity%
  398.  
  399.     WRITE 1, CommC.Port%
  400.  
  401.     WRITE 1, CommC.Protocol%
  402.  
  403.     WRITE 1, CommC.ProtOpt%
  404.  
  405.     WRITE 1, CommC.RemEcho%
  406.  
  407.     WRITE 1, CommC.SBits%
  408.  
  409.     WRITE 1, CommC.Term%
  410.  
  411.     WRITE 1, CommC.Wrap%
  412.  
  413.     WRITE 1, CommC.XOnXOff%
  414.  
  415.     RETURN
  416.  
  417.  
  418.  
  419. getSettings:                    ' saves current Comm Control settings
  420.  
  421.     READ 1, savedFlag%          ' this is a flag to indicate settings were saved
  422.  
  423.     IF NOT savedFlag% THEN ‚àÇ
  424.  
  425.         RETURN
  426.  
  427.     READ 1, CommC.Bit8%
  428.  
  429.     READ 1, CommC.BPS%
  430.  
  431.     READ 1, CommC.BSToDEL%
  432.  
  433.     READ 1, CommC.CharDelay%
  434.  
  435.     READ 1, CommC.Chars%
  436.  
  437.     READ 1, CommC.CharSet%
  438.  
  439.     READ 1, CommC.CurBlink%
  440.  
  441.     READ 1, CommC.CurShape%
  442.  
  443.     READ 1, CommC.DBits%
  444.  
  445.     READ 1, CommC.G0%
  446.  
  447.     READ 1, CommC.G1%
  448.  
  449.     READ 1, CommC.LFCRIn%
  450.  
  451.     READ 1, CommC.LFCROut%
  452.  
  453.     READ 1, CommC.LineDelay%
  454.  
  455.     READ 1, CommC.Lines%
  456.  
  457.     READ 1, CommC.LocEcho%
  458.  
  459.     READ 1, CommC.Parity%
  460.  
  461.     READ 1, CommC.Port%
  462.  
  463.     READ 1, CommC.Protocol%
  464.  
  465.     READ 1, CommC.ProtOpt%
  466.  
  467.     READ 1, CommC.RemEcho%
  468.  
  469.     READ 1, CommC.SBits%
  470.  
  471.     READ 1, CommC.Term%
  472.  
  473.     READ 1, CommC.Wrap%
  474.  
  475.     READ 1, CommC.XOnXOff%
  476.  
  477.     RETURN
  478.  
  479.  
  480.  
  481. makeFile:                               ' makes a fixed length file of <CR>'s
  482.  
  483.     OPEN 1, ServiceFPath & "MiniTerminalPhoneBook", APPEND
  484.  
  485.     IF ResultCode% <> 0 THEN ‚àÇ
  486.  
  487.         badFile = "MiniTerminalPhoneBook" : ‚àÇ
  488.  
  489.         GOSUB fileIO_Error: ‚àÇ
  490.  
  491.         END
  492.  
  493.     Pos%(1) = 0
  494.  
  495.     theSize% = wholeBlockWidth% * maxLines% + paramBlockWidth%
  496.  
  497.     filler =  Chr(13) & Chr(13) & Chr(13) & Chr(13) & Chr(13) ‚àÇ
  498.  
  499.             & Chr(13) & Chr(13) & Chr(13) & Chr(13) & Chr(13) ‚àÇ
  500.  
  501.             & Chr(13) & Chr(13) & Chr(13) & Chr(13) & Chr(13) ‚àÇ
  502.  
  503.             & Chr(13) & Chr(13) & Chr(13) & Chr(13) & Chr(13) ‚àÇ
  504.  
  505.             & Chr(13) & Chr(13) & Chr(13) & Chr(13) & Chr(13) ‚àÇ
  506.  
  507.             & Chr(13) & Chr(13) & Chr(13) & Chr(13) & Chr(13) ‚àÇ
  508.  
  509.             & Chr(13) & Chr(13) & Chr(13) & Chr(13) & Chr(13) ‚àÇ
  510.  
  511.             & Chr(13) & Chr(13) & Chr(13) & Chr(13) & Chr(13) ‚àÇ
  512.  
  513.             & Chr(13) & Chr(13) & Chr(13) & Chr(13) & Chr(13) ‚àÇ
  514.  
  515.             & Chr(13) & Chr(13) & Chr(13) & Chr(13) & Chr(13)
  516.  
  517. makeFile1:
  518.  
  519.     WRITE 1, filler
  520.  
  521.     IF Pos%(1) < theSize% THEN ‚àÇ
  522.  
  523.         GOTO makeFile1
  524.  
  525.     x% = 0
  526.  
  527. makeFile2:
  528.  
  529.     IF x% < maxLines% THEN ‚àÇ
  530.  
  531.         Pos%(1) = wholeBlockWidth% * x% :‚àÇ
  532.  
  533.         WRITE 1, "???" :‚àÇ
  534.  
  535.         WRITE 1, "???" :‚àÇ
  536.  
  537.         x% = x% + 1 :‚àÇ
  538.  
  539.         GOTO makeFile2
  540.  
  541.     RETURN
  542.  
  543.  
  544.  
  545. getModemFile: 'gets name of modem file and stores it in variable @modemFile
  546.  
  547.     HOLD ON
  548.  
  549.     Message = ""
  550.  
  551.     prompt1 = "Please select the modem file:"
  552.  
  553.     fileType1 = "SERV"
  554.  
  555.     HOLD OFF
  556.  
  557.     modemFile = GetFile(prompt1,fileType1,ServiceFPath)
  558.  
  559.     HOLD ON
  560.  
  561.     CURSOR WATCH
  562.  
  563.     IF (ResultCode% = 100) OR (DBoxResult% = CANCEL%) THEN END
  564.  
  565.  
  566.  
  567.     'parse the path from string returned by GetFile
  568.  
  569.     myPath = modemFile
  570.  
  571.     lastColon% = 0
  572.  
  573. getLastColon:
  574.  
  575.     IF InStr%(lastColon%+1, myPath, ":") <> 0 THEN ‚àÇ
  576.  
  577.         lastColon% = lastColon%+1: GOTO getLastColon
  578.  
  579.  
  580.  
  581.     myPath = Left(myPath,lastColon%)
  582.  
  583.     modemFile = Mid(modemFile, lastColon%+1)
  584.  
  585.  
  586.  
  587.     ServiceFPath = myPath   ' set ServiceFPath to path returned by GetFile
  588.  
  589.     Message = ""
  590.  
  591.     DO FILE modemFile "Identify"
  592.  
  593.     IF (ResultCode% <> 0) THEN ‚àÇ
  594.  
  595.         IF (ResultCode% <> 106) THEN ‚àÇ          ' bad label error
  596.  
  597.             badFile = modemFile: ‚àÇ              ' 106 is "label not found" error
  598.  
  599.             badLabel = "Identify": ‚àÇ
  600.  
  601.             GOSUB doFileError: ‚àÇ
  602.  
  603.             END ‚àÇ
  604.  
  605.         ELSE Message = "NotModem"               ' coerce dbox for error #106
  606.  
  607.  
  608.  
  609.     ' check for if modemFile is really a modem file
  610.  
  611.     IF UpCase(Message) <> "MODEM" THEN ‚àÇ
  612.  
  613.         DBoxSay = modemFile & " does not appear to be a modem file.  " & ‚àÇ
  614.  
  615.             "An example of a modem file for Apple and " & ‚àÇ
  616.  
  617.             "Hayes-compatible modems is ""Hayes Modem.""  Try again?": ‚àÇ
  618.  
  619.         HOLD OFF: ‚àÇ
  620.  
  621.         DBOX 2: ‚àÇ
  622.  
  623.         IF DBoxResult% = OK% THEN GOTO getModemFile ‚àÇ
  624.  
  625.         ELSE END
  626.  
  627.  
  628.  
  629.     ' check to see if modem file in Lookup Table is still there
  630.  
  631.     IF @ModemFile <> "" THEN ‚àÇ
  632.  
  633.         IF NOT Exists%(ServiceFPath & @modemFile) THEN CLEAR @modemFile ‚àÇ
  634.  
  635.         ELSE DO FILE @modemFile "ClearTable": ‚àÇ
  636.  
  637.             IF ResultCode% <> 0 THEN ‚àÇ  ' check for errors executing "DO FILE"
  638.  
  639.                 badFile = @modemFile: ‚àÇ
  640.  
  641.                 badLabel =  "ClearTable": ‚àÇ
  642.  
  643.                 GOSUB doFileError: ‚àÇ
  644.  
  645.                 END
  646.  
  647.  
  648.  
  649.     @modemFile = modemFile  ' put new modem file in lookup table
  650.  
  651.     Message = ""            ' routine was successful
  652.  
  653.     RETURN
  654.  
  655.  
  656.  
  657. doFileError:    ' puts up error dialog and aborts
  658.  
  659.     HOLD OFF
  660.  
  661.     BELL:BELL   ' alert user
  662.  
  663.     ' Give user a description of error
  664.  
  665.     IF ResultCode% = 106 THEN DBoxSay = "Cannot find the label """ & badLabel & ‚àÇ
  666.  
  667.         """ in the file """ & badFile & """.  Program aborted." ‚àÇ
  668.  
  669.     ELSE IF ResultCode% = -108 THEN ‚àÇ
  670.  
  671.         DBoxSay = "Not enough memory to open the file """ & ‚àÇ
  672.  
  673.         badFile & """.  Program aborted." ‚àÇ
  674.  
  675.     ELSE IF ResultCode% = -35 THEN ‚àÇ
  676.  
  677.         DBoxSay = "Cannot open the file """ & badFile & ‚àÇ
  678.  
  679.         """ because volume specified doesn't exist.  Program aborted." ‚àÇ
  680.  
  681.     ELSE IF ResultCode% = -49 THEN ‚àÇ
  682.  
  683.         DBoxSay = "Cannot open the file """ & badFile & ‚àÇ
  684.  
  685.         """ because it is already open for writing.  Program aborted." ‚àÇ
  686.  
  687.     ELSE IF ResultCode% = -47 THEN ‚àÇ
  688.  
  689.         DBoxSay = "Cannot open the file """ & badFile & ‚àÇ
  690.  
  691.         """ because it is busy.  Program aborted." ‚àÇ
  692.  
  693.     ELSE DBoxSay = "The following error occurred during a call to """ & badLabel & ‚àÇ
  694.  
  695.         """ in the file """ & badFile & """:  Macintosh error result code = " & ‚àÇ
  696.  
  697.         ResultCode% & ".  Program aborted."
  698.  
  699.     DBOX 1
  700.  
  701.     RETURN
  702.  
  703.  
  704.  
  705. fileIO_Error:   ' puts up error dialog and aborts
  706.  
  707.     HOLD OFF
  708.  
  709.     BELL:BELL   ' alert user
  710.  
  711.     ' Give user a description of error
  712.  
  713.     IF ResultCode% = -108 THEN ‚àÇ
  714.  
  715.     DBoxSay = "Not enough memory to open the file """ & ‚àÇ
  716.  
  717.         badFile & """.  Program aborted." ‚àÇ
  718.  
  719.     ELSE IF ResultCode% = -49 THEN ‚àÇ
  720.  
  721.         DBoxSay = "Cannot open the file """ & badFile & ‚àÇ
  722.  
  723.         """ because it is already open for writing.  Program aborted." ‚àÇ
  724.  
  725.     ELSE IF ResultCode% = -47 THEN ‚àÇ
  726.  
  727.         DBoxSay = "Cannot open the file """ & badFile & ‚àÇ
  728.  
  729.         """ because it is busy.  Program aborted." ‚àÇ
  730.  
  731.     ELSE IF ResultCode% = -46 THEN ‚àÇ
  732.  
  733.         DBoxSay = "Cannot open the file """ & badFile & ‚àÇ
  734.  
  735.         """ because volume is locked by a software flag.  Program aborted." ‚àÇ
  736.  
  737.     ELSE IF ResultCode% = -45 THEN ‚àÇ
  738.  
  739.         DBoxSay = "Cannot open the file """ & badFile & ‚àÇ
  740.  
  741.         """ because file is locked.  Program aborted." ‚àÇ
  742.  
  743.     ELSE IF ResultCode% = -35 THEN ‚àÇ
  744.  
  745.         DBoxSay = "Cannot open the file """ & badFile & ‚àÇ
  746.  
  747.         """ because volume specified doesn't exist.  Program aborted." ‚àÇ
  748.  
  749.     ELSE IF ResultCode% = -44 THEN ‚àÇ
  750.  
  751.         DBoxSay = "Cannot open the file """ & badFile & ‚àÇ
  752.  
  753.         """ because volume is locked by a hardware setting.  Program aborted." ‚àÇ
  754.  
  755.     ELSE DBoxSay = "The following error occurred opening the file """ ‚àÇ
  756.  
  757.         & badFile & """:  Macintosh error result code = " & ‚àÇ
  758.  
  759.         ResultCode% & ".  Program aborted."
  760.  
  761.     DBOX 1
  762.  
  763.     RETURN
  764.  
  765.  
  766.  
  767. Interrupt:
  768.  
  769.     CLEAR DBOX 406
  770.  
  771.     IF changedSettings% THEN ‚àÇ
  772.  
  773.         Pos%(1) = maxLines% * wholeBlockWidth% :‚àÇ
  774.  
  775.         GOSUB getSettings
  776.  
  777.     CLOSE 1
  778.  
  779.     LEAVE
  780.  
  781.